# Extending SAP Joule with Joule Studio - Course Content
**Source**: SAP TechEd 2025 (AI163)
**Objective**: Hands-on experience to extend Joule and build AI agents.
## Module 1: Understanding Joule Skills
**Joule Skills** are modular components designed to execute atomic, predefined operations. They are ideal for low-complexity, high-frequency operations where consistency is critical.
### Key Characteristics
- **Atomic**: Performs a single task (e.g., retrieve data, trigger transaction).
- **Deterministic**: Logic is non-adaptive; outcomes are predictable.
- **Integrated**: Uses SAP Build Actions to connect to APIs.
---
## Module 2: Creating a Joule Skill Package
### Exercise: Create a New Skill Package
1. **Log in** to your SAP Build Lobby.
2. Click **Create** -> **Build and Automate** -> **Joule Skill**.
3. **Enter Details**:
- **Name**: `Logistics Agent <YourID>`
- **Description**: `Joule skills for GTT shipment management`
4. Click **Create**.
- *Result*: A new tab opens with your Skill Package.
---
## Module 3: Building a Specific Skill (Get Delayed Shipments)
This skill fetches delayed shipments from the SAP Business Networks GTT System.
### Step-by-Step
1. In your new package, click **Create** -> **Joule Skill**.
2. **Define Skill**:
- **Name**: `Get Delayed Shipments`
- **Description**: `A skill to get all delayed shipments from the GTT system`
3. **Add Action**:
- In the skill builder, click the **+ (Add)** button.
- Select **Call Action** -> **Browse All Actions**.
- Search for `GTTReadService` and click **Add**.
4. **Configure Destination**:
- Click the action node.
- Under **Destination Variable**, select **Create Environment Variable**.
- **Identifier**: `GetFromGTT`
- **Description**: `Destination to fetch data from the GTT System`
5. **Configure Input Filter**:
- Go to **Input** tab of the action.
- Click `$filter` and open the **Formula Editor**.
- Enter: `ConcatenateStrings(["delayStatus eq ", true, ""], "")`
- Click **Apply**.
6. **Save** your work.
---
## Module 4: Creating a Joule Agent
Agents allow for complex, multi-step reasoning and can orchestrate multiple skills.
### Exercise: Create and Define Agent
1. In project overview, click **Create** -> **Joule Agent**.
2. **Details**:
- **Name**: `Agent for Logistics`
- **Description**: `Agent to create, update, or track shipments`
3. **Define System Prompt**:
- **Expertise**: `Executes shipment creation, retrieves tracking details, identifies delayed shipments...`
- **Instructions**:
```text
You are responsible for handling logistics-related user requests.
1. Create Shipment: Use "Create Shipment" tool.
2. Suggest Carriers: Use "Carrier Selection Guide".
3. Track Shipment: Use "Track Shipment" tool.
4. Delayed Shipments: Use "Delayed Shipments" tool.
```
4. **Add Tools**:
- Click **Add Tool** -> **Joule Skill**.
- Select `Get Delayed Shipments` and any other skills you created.
- Click **Add**.
5. **Save** the Agent.
---
## Module 5: Release and Deploy
### Part A: Create Shared Environment
1. Go to **Control Tower** -> **Environments**.
2. Click **Create**.
- **Name**: `JouleAgent_<YourID>`
- **Description**: `Shared environment for testing`
3. Click **Create**.
### Part B: Release and Deploy
1. In Joule Studio, click **Release** (top right).
2. Once released, click **Deploy**.
3. Select your **Shared Environment**.
4. **Map Destinations**:
- `GetFromGTT` -> `gttGetService`
- `PostToGTT` -> `gttwriteservice`
5. Click **Deploy**.
### Part C: Test
1. Go to **Control Tower** -> **Environments**.
2. Open your environment -> **Joule** tab -> **Launch**.
3. Test prompts:
- "Show me all delayed shipments"
- "Where is my delivery?"
---
**End of Course Content**